<?php
namespace app\index\controller;
use think\Request;
use think\controller\Rest;
class Message extends Rest{
    public function readAll(){
        $model = model('Message');
        $data=$model->select();
        return json($data);
    }
    public function add(){
        $model = model('Message');
    	$data['wxname']=input('param.wxname');
        $data['wxaccount']=input('param.wxaccount');
    	$data['content']=input('param.content');
    	$data['time']=input('param.time');
    	$data['avatarUrl']=input('param.avatarUrl');
        $res=$model->insert($data);
        return json($data);
    }
}